from fastapi import APIRouter

from core.chat_core import generateTestCase_with_chat
from entity.schema.chat_schema import chatInput
from utils.base_response import ChatResponse

chat=APIRouter()

@chat.post("/generateTestCase")
async def generateTestCase(input: chatInput):
    result=await generateTestCase_with_chat(input.conversationId,input.userInput,input.fileId,input.method)
    return ChatResponse(code=10000, msg="success", data=result,flag=True)